import fs from 'fs'
import express from "express";
import serverConfig from "../config/server.config";
import ExpressApp from "../service/express/Express.app";

ExpressApp.post('/config/update', express.json(), (req, res) => {
  const fileName = `${serverConfig.app.exportUrl}/metadata.json`
  fs.openSync(fileName, 'w+')
  fs.writeFileSync(fileName, JSON.stringify(req.body, {}, 2))

  res.send('success')
});
